﻿<%@ Page Language="C#" MasterPageFile="~/aspnet/admin/ForValidation.master" AutoEventWireup="true" CodeFile="CX_News_Edit.aspx.cs" Inherits="aspnet_admin_bock_News_CX_News_Edit" Title="Untitled Page" %>

<%@ Register Src="~/aspnet/admin/WebHTMLEditor.ascx" TagPrefix="Skybot" TagName="WebHTMLEditor" %>
<%@ Register Assembly="web表单验证控件" Namespace="CheckForm" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
<script language="javascript" type="text/javascript" src="../../inc/js/ajaxrequest.js"></script>

    <table align="center" border="0" cellpadding="2" cellspacing="1" class="border" height="116"
        width="100%">
        <tr>
            <td class="topbg" colspan="2" align="center" style="height: 30px">
                <strong>新闻管理</strong></td>
        </tr>
        <tr>
            <td class="tdbg" style="height: 27px; width: 223px;">
                提示信息:</td>
            <td class="tdbg" style="height: 27px; width: 787px;">
                <asp:Label ID="tt" runat="server" CssClass="font-4"></asp:Label></td>
        </tr>
    </table>
    <br />
    <table align="center" border="0" cellpadding="2" cellspacing="1" class="border" height="116"
        width="100%">
        <tr align="center">
            <td class="topbg" colspan="2" style="height: 30px">
                <strong>修改新闻</strong></td>
        </tr>
        <tr>
            <td class="tdbg" width="223">
                新闻分类:</td>
            <td class="tdbg" width="787">
                <asp:Label ID="News_ClassID" runat="server" ></asp:Label>
                </td>
        </tr>
        <tr>
            <td class="tdbg" style="height: 27px" width="223">
                新闻名称:</td>
            <td class="tdbg" style="height: 27px" width="787">
                <cc1:FormValidation ID="CX_NEWS_Name" runat="server" CssClass="alpha" datatype="Require"
                    MsgX="请填写栏目名" Width="473px" 是否验试="验试" MaxLength="100"></cc1:FormValidation>
                <asp:Label ID="lblRepeat" runat="server" Text="重复提示"></asp:Label></td>
        </tr>
        <tr>
            <td class="tdbg" style="height: 27px">
                新闻作者:</td>
            <td class="tdbg" style="height: 27px">
                <label>
                    <cc1:FormValidation ID="CX_NEWS_Creater" runat="server" CssClass="alpha" datatype="Require"
                        MaxLength="100" MsgX="新闻作者" Width="166px" 是否验试="验试"></cc1:FormValidation>       
                        <select id="Authors" runat="server">
                          <option value="无名">无名</option>
                          <option value="本站">本站</option>
                          <option value="未知" selected="selected">未知</option>
                          
                        </select>
            
            </label></td>
        </tr>
        <tr>
            <td class="tdbg" style="height: 27px">
                编缉:</td>
            <td class="tdbg" style="height: 27px">
                <asp:TextBox ID="CX_NEWS_Class_Edit" runat="server"  CssClass="alpha" ></asp:TextBox></td>
        </tr>
        <tr>
            <td class="tdbg" style="height: 27px">
                文章来源:</td>
            <td class="tdbg" style="height: 27px">
                <cc1:formvalidation id="CX_NEWS_From" runat="server" cssclass="alpha" datatype="Require"
                    width="169px" 是否验试="验试" MaxLength="300" MsgX="文章来源"></cc1:formvalidation>
               <select   id="SourceFrom" runat="server">
              <option value="本站原创" selected="selected">本站原创</option>
              <option value="不详">不详</option>
            </select>
                </td>
        </tr>
        <!--  病种关键字功能屏蔽 2007-10-11
        <tr>
            <td class="tdbg" style="height: 27px">
                关键字&nbsp; :</td>
            <td class="tdbg" style="height: 27px">
                <cc1:FormValidation ID="Cx_keyWord_Name" runat="server" CssClass="alpha" datatype="Require"
                    MaxLength="300" MsgX="关键字不能为空，请在后面下拉菜单中选择" Width="169px" 是否验试="验试"></cc1:FormValidation>
                <asp:DropDownList ID="Keywordssss" runat="server">
                </asp:DropDownList></td>
        </tr>
        -->
        <tr>
            <td class="tdbg" style="height: 27px">
                新闻可选类型:</td>
            <td class="tdbg" style="height: 27px">
                <asp:CheckBox ID="CheckBox1" runat="server"  Text="一般新闻" Checked="true" />
              <input id="CX_NEWS_Top" type="checkbox"  runat="server" value="1"/> 头条新闻  
              <input id="CX_NEWS_Pic" type="checkbox"  runat="server" value="1"/> 图片新闻</td>
        </tr>
        <!-- 这里显示上传图片 -->
         <tr id="cc" >
            <td class="tdbg" style="height: 27px">
                新闻图片:</td>
            <td class="tdbg" style="height: 27px">
                <cc1:FormValidation ID="CX_NEWS_Pic_Url" runat="server" MaxLength="250"></cc1:FormValidation>

                <input id="Button2" type="button" value="上传图片"  Class="Text_box"  runat="server"/></td>
        </tr>
       
        <tr>
            <td class="tdbg" style="height: 27px">
                新闻排序(0-99999):</td>
            <td class="tdbg" style="height: 27px">
                <cc1:FormValidation ID="CX_NEWS_Sort" runat="server" CssClass="alpha"
                    datatype="Double" MaxLength="5" Width="53px" Text="0"
                                        是否验试="验试"></cc1:FormValidation></td>
        </tr>
        <tr>
            <td class="tdbg" height="27">
                新闻内容(*):</td>
            <td class="tdbg" height="27">
                <Skybot:WebHTMLEditor  ID="CX_NEWS_Cont" runat="server" Height="362px" Width="580px">
                </Skybot:WebHTMLEditor >
            </td>
        </tr>
                <tr>
            <td class="tdbg" style="height: 27px">
                文章页面标题:</td>
            <td class="tdbg" style="height: 27px">
                <cc1:FormValidation ID="CX_NEWS_Title" runat="server" CssClass="alpha" MaxLength="800"
                    Width="569px"></cc1:FormValidation></td>
        </tr>
        <tr>
            <td class="tdbg" height="27">
                文章页面keyword 多个请用 ,&nbsp; 格开:</td>
            <td class="tdbg" height="27">
                <cc1:FormValidation ID="CX_NEWS_KeyWords" runat="server" CssClass="box" Height="66px"
                    MaxLength="1800" TextMode="MultiLine" Width="576px"></cc1:FormValidation></td>
        </tr>
        <tr>
            <td class="tdbg" style="height: 31px">
                文章页面描述:<br /><asp:Label ID="dfsdfsd"  CssClass="font-2 hand" runat="server" Text="得到keyword与描述"></asp:Label><br />
                如果没有输出文章内容 将不能得到 描述
                </td>
            <td class="tdbg" style="height: 31px">
                <cc1:FormValidation ID="CX_NEWS_Description" runat="server" CssClass="box" Height="107px"
                    MaxLength="1800" TextMode="MultiLine" Width="576px"></cc1:FormValidation></td>
        </tr>
        <tr>
            <td class="tdbg" colspan="2" style="height: 27px">
            <center>
                <asp:Button ID="Button1" runat="server" Text="确定"  />
                <asp:Label ID="Labelalert" runat="server"></asp:Label></center>
            </td>
        </tr>
    </table>
    <script language="javascript" type="text/javascript">
   document.getElementById("cc").style.display="none";
    function showcc()
    {
        var tabobjext = document.getElementById("cc");
        if(tabobjext.style.display=="none")
        {
            tabobjext.style.display="compact";
        }
        else
        
        {
            tabobjext.style.display="none";
        }
        
    }
    
        function xssrrr()
    {
        var ajax=new AJAXRequest();
    ajax.post('CX_News_Write_Itemp.ashx?Cid='+document.getElementById("CX_NEWS_Class_id").value,'',function(obj) {
    document.getElementById("<%=CX_NEWS_KeyWords.ClientID %>").value =obj.responseText+",";
     });
     
        try
        {

                document.getElementById("<%=CX_NEWS_Description.ClientID %>").value = DelHtml(WheContentIframectl00_ContentPlaceHolder2_CX_NEWS_Cont.document.body.innerHTML).replace("\r\n","").replace("\r","").replace("\n","").replace("nbsp","").substring(0,100).replace("&;","");
           
        }
        catch(e)
        {
            alert("此浏览器不支持JS生成DOM的对象2次操作");
        }
    }
       document.getElementById("<%=CX_NEWS_Name.ClientID %>").onchange=function(){document.getElementById("<%=CX_NEWS_Title.ClientID %>").value =this.value};
       
       
       document.getElementById("<%=dfsdfsd.ClientID %>").onmouseover=function(){xssrrr()};
       
       document.getElementById("<%=CX_NEWS_KeyWords.ClientID %>").onmouseover=function(){xssrrr()};
       
       
//double alert
try
{
    document.getElementById("<%=lblRepeat.ClientID %>").innerHTML =aspnet_admin_bock_News_CX_News_Edit.ShowRepeat(document.getElementById("<%=CX_NEWS_Name.ClientID %>").value,"<%=id %>").value;
}
catch(e)
{
    //alert(e);
}

    </script>
</asp:Content>
